home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / doors_1 / gapqbdr.zip / GAPQBERR.BI < prev    next >
Text File  |  1991-01-12  |  2KB  |  62 lines

  1. '
  2. '  Copyright (C) 1988,1989 The GAP Development Company
  3. '
  4. '  ALL RIGHTS RESERVED
  5. '
  6. '  RESTRICTIONS APPLY
  7. '
  8. '  This source code is considered to be confidential information proprietary
  9. '  to The GAP Development Company.  It is prohibited and punishable by law
  10. '  to use or duplicate any part of this information.  This source code may
  11. '  be used and modified by the licensee on a single computer.  It may not
  12. '  be used by multiple users at the same time on a networked system.  No
  13. '  portion of this source code may be disclosed to other persons under any
  14. '  circumstance, even if another person is a licensed GAPQBDR user.
  15. '
  16. '  This source code is licensed to the end user and at all times remains
  17. '  the property of GAP Development Company.  This source code may not,
  18. '  under any circumstance, be placed in a library for general use.
  19. '
  20. '
  21. '
  22. '  GAPQBERR.BI
  23. '
  24. '  Global Error Trapper For ALL modules
  25. '
  26. '  To be included with main module
  27. '  
  28. '  Main Module must be compiled with /e
  29. '
  30. '  Note, this file MUST be included with each main module (your
  31. '  program is the main module), and it MUST appear AFTER any
  32. '  variable declarations and BEFORE any executible statements.
  33. '  
  34.  
  35.    '***********************************************************************
  36.    '*  All errors are FATAL.                                              *
  37.    '*  Note that the error trap must not call any GAPQBDR functions that  *
  38.    '*  send output to the remote user.  Otherwise, severe recurrsion will *
  39.    '*  occur and it is likely a stack overflow will result.               *
  40.    '***********************************************************************
  41.  
  42.    ON ERROR GOTO error.trap               ' set up error handler
  43.  
  44.    goto gapstart                          ' jump to main program
  45.  
  46. error.trap:
  47.  
  48.    CLS 2
  49.    CALL gapputs(CRLF + CRLF + "Error in Module GAPQBDR. Error # = " + STR$(ERR) + CRLF + CRLF)
  50.    CALL waitasec(5)
  51.  
  52.    IF l.ocal = 0 THEN
  53.       CALL reset.port                      ' shut down the port
  54.    END IF
  55.  
  56.    END
  57.  
  58. gapstart:
  59.  
  60.    ' Your program begins here
  61.  
  62.